Repository navigation
Planned work left on a draft PR is finished by CoderHelm; incident regression suite in CI - #361
Merged
Merged
Conversation
…gression suite in CI When the check before the pull request still finds planned work not done, the draft PR with "Not finished" is no longer left for a person. CoderHelm works those tasks in planned-work rounds on the pull request, each in a fresh invocation with its own budget. After each round it judges the branch again, rewrites the section, and marks the PR ready when nothing is left. Two rounds in a row with no progress stop the work: the run names the tasks and why, its status is needs_input (never completed), and the PR stays a draft. The incident suite (worker passes::incidents, CI job "Incident regressions") replays each run failure of the last two days on one invented monorepo, through the pipeline's decision code, with fakes only at the edges: GitHub, recorded model replies, the sandbox's archive and log, and run records. docs/incidents.md lists each case and the guarantee it protects. The suite found one bug: a failed generator's reason quoted the first 300 characters of the build log, which is CodeBuild's echo of the buildspec, never the generator's error. It now quotes what the generator printed last.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two long-term fixes.
needs_input(nevercompleted), and the PR stays a draft.Changes
Planned-work rounds (
passes/finish_planned.rs,resume.rs,mod.rs,round.rs,common/run_round.rs, the stuck-run sweep)run_round::Kind::PlannedWork(planned_work). It has the same budget, parking, WIP branch and one-commit landing as the other rounds.Roundgainsstalled, the number of rounds in a row without progress. The Python sweep knows the kind, and a test checks that it lists every kind.run_passesparks the first round, which runs 5 seconds later. If a security round is parked, that round runs first, and the planned-work round starts after it (start_planned_work).after_planned_roundhandles each round:recheck_planned_work).finish_planned::next. A round that pushed changes or finished a task is progress. A judge that can't answer counts as nothing done.steps::MAX_RUN_STEPSstays as the runaway ceiling.finish_planned::run_status.pr_holder::busy, as for other rounds).Incident suite (
passes/incidents/, CI job Incident regressions:cargo test -p worker 'incidents::',docs/incidents.md)apps/studio: a CMS schema and atypegenscript that writesapps/studio/schema.json, plus../web/src/lib/sanity/sanity.types.ts.apps/web.e2e/with a test map.sandbox::codegen_outcomebehind aCodegenSourcetrait. The sandbox client is one implementation, the fake is another.generators::read_outcome, taken out ofrun_in_sandbox.resume::draft_hold, taken out ofmark_ready.mod.rs::stopped_keeping.sandbox::read_archive.failure_excerpt).../Verification
cargo fmt --all --check: clean.cargo clippy --workspace --all-targets -- -D warnings: clean.cargo test --workspace: 0 failed. That is common 1281, gateway 605 and worker 1039 (31 of them in the incident suite), plus 2.cargo test -p worker 'incidents::': 31 passed.python3 -m unittest discover -s lambda/tests: 168 passed.check_workflows.pyandactionlinton the new job: clean.Gaps:
orchestrate_ticketfrom start to finish. The GitHub client has a fixed API base, and the AWS clients are built inmain. Making them injectable is a separate change.resume_multi_repo) runs no rounds.